<!DOCTYPE html>
<html lang="zh-CN">


<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, user-scalable=no">
  <title>
    linux | 风林火山
  </title>
  <meta name="description" content="hello world">
  
  <meta name="keywords" content="
  
  ">
  
  <meta name="author" content="矫情">

  <meta http-equiv="Cache-Control" content="no-transform"/>
  <meta http-equiv="Cache-Control" content="no-siteapp">
  <meta name="theme-color" content="#1e2327">
  <link rel="apple-touch-icon" href="https://github.githubassets.com/apple-touch-icon.png">
  <link rel="apple-touch-icon" sizes="180x180" href="https://github.githubassets.com/apple-touch-icon-180x180.png">

  <link rel="icon" type="image/x-icon" href="https://github.githubassets.com/favicon.ico">
  <link rel="stylesheet" href="/blog/css/main.css">
  <link rel="stylesheet"
        href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
  

  

  <script src="//cdnjs.cloudflare.com/ajax/libs/vue/1.0.25-csp/vue.min.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js"></script>
</head>

<body id="replica-app">

<nav class="navbar-wrapper">
  <div class="navbar">
    <div class="container clearfix">
      <a href="/blog/" class="navbar-logo"><i class="fa fa-github"></i></a>

      <div class="navbar-search float-left desktop-only">
        <div class="navbar-search-form">
          <label for="gsc-i-id1">This website</label>
          <div id="google-search">
            <gcse:search></gcse:search>
          </div>
        </div>
      </div>

      <ul class="navbar-nav float-left">
        
        <li><a href="/blog/archives">Archives</a></li>
        
        
        <li><a href="/blog/categories">Categories</a></li>
        
        
        <li><a href="/blog/tags">Tags</a></li>
        
        
        <li class="desktop-only"><a href="/blog/atom.xml" target="_blank">RSS</a></li>
        
      </ul>

      <ul class="navbar-nav user-nav float-right desktop-only">
        <li class="user-nav-notification">
          <a><span class="user-nav-unread"></span><i class="fa fa-bell"></i></a>
        </li>
        <li>
          <a><i class="fa fa-plus"></i> <i class="fa fa-caret-down"></i></a>
        </li>
        <li class="user-nav-logo">
          <a><img src="https://octodex.github.com/images/baracktocat.jpg"> <i class="fa fa-caret-down"></i></i></a>
        </li>
      </ul>
    </div>
  </div>
</nav>

<div class="main-container">
  <header class="header-wrapper desktop-only">
  <div class="container header-site-detail">
    <ul class="header-toolbar">
      <li class="clearfix">
        <a href="/blog/archives" class="header-toolbar-left"><i
                  class="fa fa-file-text"></i> Posts </a>
        <a href="/blog/archives"
           class="header-toolbar-right"> 5 </a>
      </li>
      <li>
        <a href="/blog/tags" class="header-toolbar-left"><i
                  class="fa fa-tags"></i> Tags </a>
        <a href="/blog/tags"
           class="header-toolbar-right"> 0 </a>
      </li>
      <li>
        <a href="/blog/categories" class="header-toolbar-left"><i
                  class="fa fa-folder-open"></i> Categories </a>
        <a href="/blog/categories"
           class="header-toolbar-right"> 0 </a>
      </li>
    </ul>
    <h2 class="header-title">
      <i class="fa fa-book text-muted"></i>
      <a href="/blog/">风林火山</a>
      
      
    </h2>
  </div>

  <div class="container">
    <div class="header-tab-wrapper clearfix">
      <span class="header-tab header-tab-selected"><i class="fa fa-thumbs-o-up"></i> Like</span>
      <span class="header-tab"><i class="fa fa-share-alt"></i> Share</span>
      <span class="header-tab"><i class="fa fa-comments-o"></i> Discussion</span>
      <span class="header-tab"><i class="fa fa-bookmark-o"></i> Bookmark </span>
      <span class="header-tab"><i class="fa fa-smile-o"></i> Smile <i class="fa fa-caret-down"></i></span>
    </div>
  </div>
</header>


<div class="post-container container">
  <h3>
    <i class="fa fa-user-o"></i>
    矫情

    <span class="post-date float-right" title="{{moment(1572072750739).format('MMM DD, YYYY, h:mm:ss A')}}">
      <i class="fa fa-pencil-square-o"></i>
      {{moment(1572072750739).fromNow()}}
    </span>
  </h3>

  <article class="post-content">
    <h1>linux</h1>
    <h1 id="操作系统"><a href="#操作系统" class="headerlink" title="操作系统"></a>操作系统</h1><h2 id="分类"><a href="#分类" class="headerlink" title="分类"></a>分类</h2><h3 id="桌面操作系统"><a href="#桌面操作系统" class="headerlink" title="桌面操作系统"></a>桌面操作系统</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">windows</span><br><span class="line">linux</span><br><span class="line">mac os</span><br></pre></td></tr></table></figure>

<h3 id="服务器操作系统"><a href="#服务器操作系统" class="headerlink" title="服务器操作系统"></a>服务器操作系统</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">windows server</span><br><span class="line">linux</span><br><span class="line">unix</span><br></pre></td></tr></table></figure>

<h3 id="嵌入式操作系统"><a href="#嵌入式操作系统" class="headerlink" title="嵌入式操作系统"></a>嵌入式操作系统</h3><h1 id="Linux-概述"><a href="#Linux-概述" class="headerlink" title="Linux 概述"></a>Linux 概述</h1><h2 id="起源"><a href="#起源" class="headerlink" title="起源"></a>起源</h2><h2 id="版本"><a href="#版本" class="headerlink" title="版本"></a>版本</h2><h3 id="RedHat"><a href="#RedHat" class="headerlink" title="RedHat"></a>RedHat</h3><p>CentOS 社区免费版 (稳定性) 适合服务器</p>
<h3 id="ubuntu"><a href="#ubuntu" class="headerlink" title="ubuntu"></a>ubuntu</h3><p>适合桌面操作系统</p>
<h3 id="debian"><a href="#debian" class="headerlink" title="debian"></a>debian</h3><h2 id="Linux安装"><a href="#Linux安装" class="headerlink" title="Linux安装"></a>Linux安装</h2><p>通过虚拟机安装 (VMware)</p>
<h1 id="常用命令"><a href="#常用命令" class="headerlink" title="常用命令"></a>常用命令</h1><h2 id="目录操作"><a href="#目录操作" class="headerlink" title="目录操作"></a>目录操作</h2><h3 id="查看当前目录"><a href="#查看当前目录" class="headerlink" title="查看当前目录"></a>查看当前目录</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pwd</span><br></pre></td></tr></table></figure>

<p>目录切换 (打开目录)</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">cd</span><br></pre></td></tr></table></figure>

<table>
<thead>
<tr>
<th>命令参数</th>
<th>说明</th>
</tr>
</thead>
<tbody><tr>
<td>..</td>
<td>返回上级目录</td>
</tr>
<tr>
<td>../</td>
<td>返回上级目录</td>
</tr>
<tr>
<td>文件名</td>
<td>进入到指定文件</td>
</tr>
<tr>
<td>-</td>
<td>进入该目录之前的目录</td>
</tr>
<tr>
<td>~</td>
<td>进入当前用户根目录</td>
</tr>
<tr>
<td>/</td>
<td>进入 根目录</td>
</tr>
<tr>
<td>-P - L</td>
<td></td>
</tr>
</tbody></table>
<h2 id="查看文件目录"><a href="#查看文件目录" class="headerlink" title="查看文件目录"></a>查看文件目录</h2><p>浏览目录中的文件列表</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">ls  </span><br><span class="line">ls -a   查看隐藏文件</span><br><span class="line">ls -l</span><br><span class="line">ls -la</span><br><span class="line">ll</span><br></pre></td></tr></table></figure>

<h2 id="创建文件夹的命令"><a href="#创建文件夹的命令" class="headerlink" title="创建文件夹的命令"></a>创建文件夹的命令</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">mkdir</span><br><span class="line">-p 创建多级目录</span><br></pre></td></tr></table></figure>

<h2 id="删除目录"><a href="#删除目录" class="headerlink" title="删除目录"></a>删除目录</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">rmdir</span><br><span class="line">rm </span><br><span class="line">rm 如果不加 -r 参数 无法删除目录()只能删除文件</span><br></pre></td></tr></table></figure>

<table>
<thead>
<tr>
<th>rm 参数</th>
<th></th>
</tr>
</thead>
<tbody><tr>
<td>-r</td>
<td>递归删除</td>
</tr>
<tr>
<td>-f</td>
<td>强制删除</td>
</tr>
<tr>
<td>-i</td>
<td>互动模式, 询问执行者是否删除</td>
</tr>
<tr>
<td>-rf</td>
<td>强制递归删除</td>
</tr>
</tbody></table>
<h2 id="复制文件或目录"><a href="#复制文件或目录" class="headerlink" title="复制文件或目录"></a>复制文件或目录</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">cp 原始文件或目录  目标目录</span><br></pre></td></tr></table></figure>

<table>
<thead>
<tr>
<th>参数</th>
<th></th>
</tr>
</thead>
<tbody><tr>
<td>-r</td>
<td>递归复制 (用于复制文件目录)</td>
</tr>
<tr>
<td>-i</td>
<td>覆盖之前 先询问</td>
</tr>
<tr>
<td>-f</td>
<td>(force) 强制  (如果复制过程中如果发生 重复现象 , 执行覆盖操作)</td>
</tr>
<tr>
<td>-p</td>
<td>保留源文件和目录的属性</td>
</tr>
</tbody></table>
<h2 id="文件移动-剪切"><a href="#文件移动-剪切" class="headerlink" title="文件移动(剪切)"></a>文件移动(剪切)</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">mv </span><br><span class="line">文件重命名</span><br></pre></td></tr></table></figure>









<h2 id="清屏"><a href="#清屏" class="headerlink" title="清屏"></a>清屏</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">clear</span><br></pre></td></tr></table></figure>


  </article>
</div>


    




</div>

<div class="footer-wrapper container">
  <footer class="footer clearfix">
    <div class="clearfix">
    <a href="http://weixin66.gitee.io/blog" class="footer-logo">
      <i class="fa fa-github"></i>
    </a>
    <ul class="footer-social-link">
      <li>© 2019 矫情</li>
      <li><a href="http://weixin66.gitee.io/blog">Home</a></li>
      
    </ul>
    <div class="footer-theme-info">
      Theme <a href="//github.com/sabrinaluo/hexo-theme-replica">Replica</a>
      by <a href="//github.com/sabrinaluo">Hiitea</a> ❤ Powered by Hexo
    </div>
    </div>
    
  </footer>
</div>




<script src="/blog/js/main.js"></script>

</body>
</html>
